feat(minibf): implement /epochs/{number}/stakes/{pool_id} endpoint (#1101) - #1154
Conversation
|
Warning Review limit reached
Next review available in: 29 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
dd12c0c to
d4b274f
Compare
There was a problem hiding this comment.
Pull request overview
Adds the Blockfrost-compatible GET /epochs/{epoch}/stakes/{pool_id} endpoint to the minibf service, extending the existing epoch stake distribution scan with a pool filter (matching the current AccountStakeLog storage layout where pool_id is in the log value).
Changes:
- Implement
by_number_stakes_poolhandler to scan epoch stake logs and filter rows bypool_id. - Register the new route in the Axum router and add endpoint documentation.
- Expose
decode_pool_idwithin the crate and add tests for happy-path + error cases + pagination.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/content/apis/minibf.mdx | Documents the newly supported endpoint in the minibf API list. |
| crates/minibf/src/routes/pools.rs | Makes decode_pool_id available for reuse by other route modules. |
| crates/minibf/src/routes/epochs/mod.rs | Adds the new pool-scoped epoch stakes handler plus comprehensive tests. |
| crates/minibf/src/lib.rs | Registers /epochs/{epoch}/stakes/{pool_id} in the router. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| where | ||
| Option<PoolState>: From<D::Entity>, | ||
| { | ||
| let pagination = Pagination::try_from(params)?; |
d4b274f to
c031e97
Compare
c031e97 to
5b16dd0
Compare
5b16dd0 to
6807574
Compare
6807574 to
57b7baa
Compare
Resolves #1101.
Implements
/epochs/{number}/stakes/{pool_id}(#1101).Same scan as
/epochs/{number}/stakesin the base PR, filtered by pool. The pool lives in the log value rather than the key (keeping per-account history a point read), so this endpoint scans the epoch and filters.Verified against hosted Blockfrost on preview.